package basic;

import stats.PlayerStats;
import misc.Role;

public class Player {

	private String firstName = "";
	private String lastName = "";
	private String dateOfBirth = "";
	private Role role;
	private Club club = null;
	private Country country = null;
	private PlayerStats stats = null;
	
	public Player() {
		super();
		this.firstName = "";
		this.lastName = "";
		this.dateOfBirth = "";
		this.role = null;
		this.club = null;
		this.country = null;
		this.stats = new PlayerStats();
	}
	
	public Player(String firstName, String lastName, String dateOfBirth,
			Role role, Club club, Country country) {
		super();
		this.firstName = firstName;
		this.lastName = lastName;
		this.dateOfBirth = dateOfBirth;
		this.role = role;
		this.club = club;
		this.country = country;
		this.stats = new PlayerStats();
	}
	
	public Object[] getPlayerView(){
		Object[] parameters = new Object[10];
		parameters[0] = firstName + " " + lastName;
		parameters[1] = dateOfBirth;
		parameters[2] = role;
		parameters[3] = stats.getGamesPlayed();
		parameters[4] = stats.getGoalsScored();
		parameters[5] = stats.getAssists();
		parameters[6] = stats.getShotsOnGoal();
		parameters[7] = stats.getShotsOffGoal();
		parameters[8] = stats.getYellowCards();
		parameters[9] = stats.getRedCards();
		return parameters;
	}
	
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getDateOfBirth() {
		return dateOfBirth;
	}
	public void setDateOfBirth(String dateOfBirth) {
		this.dateOfBirth = dateOfBirth;
	}
	public Role getRole() {
		return role;
	}
	public void setRole(Role role) {
		this.role = role;
	}
	public void setClub(Club club) {
		this.club = club;
	}
	public Club getClub() {
		return club;
	}	
	public void setCountry(Country country) {
		this.country = country;
	}
	public Country getCountry() {
		return country;
	}
	public void setStats(PlayerStats stats) {
		this.stats = stats;
	}
	public PlayerStats getStats() {
		return stats;
	}
	
}
